package com.zhu.esyblog.controller;


import com.zhu.esyblog.pojo.RespBean;
import com.zhu.esyblog.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author stx
 * @since 2022-06-22
 */
@RestController
@RequestMapping("/users")
@Api(tags = "用户模块")
public class SysUserController {
    @Autowired
    private ISysUserService userService;


    @ApiOperation(value = "获取用户信息")
    @GetMapping("currentUser")
    public RespBean currentUser(@RequestHeader("Authorization")String token){
     return   userService.findUserByToken(token);
   }

}
